mob
//////////////////////////// //////////////////////////// ////////////////////////////
	Stat()
		statpanel("Bio")
		stat("------Personal Info------")
		stat("Age:",age)
		stat("Heigth (Cm):",height)
		stat("Weight (Kg):",weight)
		stat("EXP:",exp)
		stat("------Condition------")
		stat("Head :",Health(head_max,head))
		stat("Chest:",Health(chest_max,chest))
		stat("Arms :",Health(arms_max,arms))
		stat("Legs :",Health(legs_max,legs))

		statpanel("Inventory")
		stat(src.contents)

//////////////////////////// //////////////////////////// ////////////////////////////

	var
	//controladoras
		ko = 0
		aim = 0
		attacking = 0
		training = 0
		locked = 0
		rest = 0
		powered = 0
		bt_rest = 0
		rest_prote = 0
		disable = 0

	//info
		height
		weight
		exp
		age
		i_age
		born

	//combate
		head_max
		head
		chest_max
		chest
		arms_max
		arms
		legs_max
		legs

	//fisico
		dmg_head
		res_head
		str_arm
		str_leg
		str_chest
		agi_arm
		agi_leg
		agi_head
		agi_chest
		recov

	//location
		s_x
		s_y
		s_z

	//skills

		//Regular Skills
		high_punch
		high_kick
		leg_kick
		arm_kick
		muscle_power = 1






//////////////////////////// //////////////////////////// ////////////////////////////

	proc


		Skill_Check()
			if(high_punch)
				src.verbs += new/mob/enemy/verb/High_Punch
			if(high_kick)
				src.verbs += new/mob/enemy/verb/High_Kick
			if(leg_kick)
				src.verbs += new/mob/enemy/verb/Leg_Kick
			if(arm_kick)
				src.verbs += new/mob/enemy/verb/High_Kick
			if(muscle_power)
				src.verbs += new/mob/enemy/verb/Muscle_Power

		Health(max, att)
			if(att <= 0)
				return "Broken"
			else if(att <= 0.1*max)
				return "Almost Broken"
			else if(att <= 0.5*max)
				return "Damaged"
			else if(att <= 0.8*max)
				return "Scratched"
			else if(att > 0.8*max)
				return "Fine"

		Death(mob/M)
			if(istype(M, /mob/enemy))
				var/mob/enemy/e = M
				src.exp += e.reward
				del(M)
			else
				M.loc=locate(1,1,1)

		KO(mob/M,timer)
			if(M.icon_state != "KO")
				M.ko = 1
				M.locked = 1
				M.icon_state = "KO"
				spawn(timer)
				if(M != null)
					Recovery(M)
			else
				src<<"He is dead"
				M<<"You Die"
				Death(M)

		Healing(mob/M)
			M.locked = 1
			M.attacking = 1
			M.head++
			M.chest++
			M.arms++
			M.legs++
			spawn(100) Healing(M)

		Recovery(mob/M)
			if(M.ko == 1)
				M.ko = 0
				M.locked = 0
				M.icon_state = ""

		Damage(op1,op2,am,dp,dm,MinMult,MaxMult)
			var dmg = (((op1 + op2)/2)*am) - ((dp)*dm)
			if(dmg <= 0)
				dmg = 1
			return rand(dmg*MinMult,dmg*MaxMult)

		Power_Up(p,m,t1,t2)
			var save
			var parts[] = list (src.res_head,src.str_chest,src.str_arm,src.str_leg)
			if(powered == 0)
				powered = 1
				src << "...Focusing Power..."
				src.icon_state = "Charge"
				sleep(t1)
				src << "[(parts[p])*m]"
				switch(p)
					if(1)
						save = src.res_head
						src.res_head = src.res_head*m
					if(2)
						save = src.str_chest
						src.str_chest = src.str_chest*m
					if(3)
						save = src.str_arm
						src.str_arm = src.str_arm*m
					if(4)
						save = src.str_leg
						src.str_leg = src.str_leg*m

				src << "Power Focused!"
				src.icon_state = ""
				sleep(t2)
				src << "You back to your normal state"
				switch(p)
					if(1)
						src.res_head = save
					if(2)
						src.str_chest = save
					if(3)
						src.str_arm = save
					if(4)
						src.str_leg = save
				sleep(t2)
				powered = 0


		Attack(hitIcon,prob,op1,op2,am,dp,dm,MinMult,MaxMult,d1,d2)
			src.BA_Check()
			if(src.attacking == 0 && src.ko == 0)
				src.locked = 1
				src.attacking = 1
				sleep(2)
				src.icon_state = "Focus"
				sleep(d1)
				if(src.ko == 0)
					src.icon_state = hitIcon
					var/obj/K = new/obj/hit
					//alcance do golpe
					//K.bound_y=50
					//K.bound_x=50
					//
					K.dir = src.dir
					K.loc = src.loc
					K.step_x=src.step_x
					K.step_y=src.step_y
					if(K.dir==NORTH)
						step(K, dir,src.bound_height)
					if(K.dir==SOUTH)
						step(K, dir,src.bound_height)
					if(K.dir==WEST)
						step(K, dir,src.bound_width)
					if(K.dir==EAST)
						step(K, dir,src.bound_width)
					//var/turf/X = K.loc
					spawn(2)
						del(K)
					for(var/mob/M as mob in obounds(K))
						if(M != src)
							var parts[] = list (M.res_head,M.str_chest,M.str_arm,M.str_leg)
							var/damage = Damage(op1,op2,am,parts[dp],dm,MinMult,MaxMult)

							if(prob(prob))
								if(dp == 1)
									src<<"You attack [M]'s head for [damage] damage!"
									M<<"[src] attacks your head for [damage] damage!"
									M.head -= damage

								if(dp == 2)
									src<<"You attack [M]'s chest for [damage] damage!"
									M<<"[src] attacks your chest for [damage] damage!"
									M.chest -= damage

								if(dp == 3)
									if((M.arms > 0))
										src<<"You attack [M]'s arms for [damage] damage!"
										M<<"[src] attacks your arms for [damage] damage!"
										M.arms -= damage
									else
										src<<"<font color = #FF0000><b>His arms is already broken!</b></font>"
										M<<"<font color = #FF0000><b>Your arms are already broken!</b></font>"
								if(dp == 4)
									if((M.legs > 0))
										src<<"You attack [M]'s legs for [damage] damage!"
										M<<"[src] attacks your legs for [damage] damage!"
										M.legs -= damage
									else
										src<<"<font color = #FF0000><b>His legs is already broken!</b></font>"
										M<<"<font color = #FF0000><b>Your legs are already broken!</b></font>"

								if((M.head <= 0) || (M.chest <= 0))
									src<<"OK! Its a KO!"
									M<<"OK! Its a KO!"
									KO(M,M.recov)
							else
								src<<"You attempt to attack [M] but miss!"
								M<<"[src] attempts to attack you but misses!"
				sleep(d2)
				if(src.icon_state != "KO")
					src.icon_state = ""
				src.attacking = 0
				src.locked = 0

//////////////////////////// //////////////////////////// ////////////////////////////

	Move()
		BL_Check()
		if(locked)
			return 0
		else
			. = ..()

	New()
		src.loc = locate(8,7,2)






	proc
		BL_Check()
			if(src.legs <= 0)
				src << "Your legs are broken. You can't walk"
				src.legs = 0
				locked = 1

		BA_Check()
			if(src.arms <= 0)
				src << "Your arms are broken. You can't attack"
				src.arms = 0
				attacking = 1

		updateAge()
			src.age = src.i_age + (year - born)


	proc
		updateInventory()
			spawn(2)
				var/i=1
				winset(src,"inventory",{"cells="2x[src.contents.len]""})
				for(var/atom/a in src.contents)
					src<<output(a,"inventory:1,[i]")
					src<<output(a.suffix,"inventory:2,[i]")
					i++
				spawn (10) updateInventory()